package DesignPattern;

import java.io.FileReader;
import java.util.Properties;

public class MediaPlay {
	public static void main(String[] args) throws Exception {
		Properties p = new Properties();
		p.load(new FileReader("./src/DesignPattern/media.properties"));
		
		String factory = p.getProperty("rm");
		Class c = Class.forName(factory);
		MediaFactory mf = (MediaFactory)c.newInstance();
		mf.getMedia().play();
	}
}
